<script type="text/javascript" src="swfupload/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
<script type="text/javascript">
                var swfu;

                window.onload = function() {
                        var settings = {
                                flash_url : "swfupload/swfupload.swf",
                                upload_url: "<?php echo base_url().'upload_book.php?bid='.$b_id;?>",
                                post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
                                file_size_limit : "100 MB",
                                file_types : "*.*",
                                file_types_description : "All Files",
                                file_upload_limit : 1, //配置上传个数
                                file_queue_limit : 0,
                                custom_settings : {
                                        progressTarget : "fsUploadProgress",
                                        cancelButtonId : "btnCancel"
                                },
                                debug: false,

                                // Button settings
                                button_image_url: "images/TestImageNoText_65x29.png",
                                button_width: "65",
                                button_height: "29",
                                button_placeholder_id: "spanButtonPlaceHolder",
                                button_text: '<span class="theFont">Upload</span>',
                                button_text_style: ".theFont { font-size: 16; }",
                                button_text_left_padding: 12,
                                button_text_top_padding: 3,

                                // The event handler functions are defined in handlers.js
                                file_queued_handler : fileQueued,
                                file_queue_error_handler : fileQueueError,
                                file_dialog_complete_handler : fileDialogComplete,
                                upload_start_handler : uploadStart,
                                upload_progress_handler : uploadProgress,
                                upload_error_handler : uploadError,
                                upload_success_handler : uploadSuccess,
                                upload_complete_handler : uploadComplete,
                                queue_complete_handler : queueComplete  // Queue plugin event
                        };

                        swfu = new SWFUpload(settings);
             };
        </script>
        <div id="comm_cms_head">
                <h2>Book File Upload</h2>
        </div>
        <div id="comm_cms_center" style="padding:80px 250px 50px 350px;border:1px solid #fff">


        <form id="form1" action="<?php echo site_url('manage/upload_book')?>" method="post" enctype="multipart/form-data">
                        <div class="fieldset flash" id="fsUploadProgress">
                        <span class="legend" style="margin:40px 0;font-size:18px">Upload Book Queue</span>
                        </div>
                <div id="divStatus" style="margin:40px 0; ">0 Files Uploaded</div>
                        <div>
                                <span id="spanButtonPlaceHolder"></span>
                                <input style=" height: 29px; margin: 0 20px 0 0; float:left"  id="btnCancel" type="button" value="Cancel Uploads" onclick="swfu.cancelQueue();" disabled="disabled" />
                        </div>
                <div>
                <br />
                <p>
                <a href="<?php echo site_url('welcome/upload_cms')?>" style="clear:both;margin-left:300px;border:1px solid #6569FE;background:#6569FE;font-size:16px;font-weight:bold;padding:5px;color:#F00;">Continue</a>
                </p>
        </div>
        </form>
